home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
26
/
3
/
DISK2631.ZIP
/
EXAMP1.ZIP
/
RMEX198.BAS
< prev
next >
Wrap
BASIC Source File
|
1990-03-28
|
500b
|
19 lines
'Reference Manual Example Page 198
CLS
$COM 1024 'set up 1K input buffer
OPEN "COM1:300,n,8,1,DS,RS,CS,CD" AS #1 LEN = 1
PRINT "Press any key to terminate the program..."
'while a key hasn't been pressed
WHILE NOT INSTAT
'if there is any input available
IF LOC(1) <> 0 THEN
'read any info available in the COM port buffer
COMPortInput$ = INPUT$(LOC(1), #1)
'display input
PRINT "COM Port input: "; COMPortInput$
END IF
WEND
CLOSE 1
END